package com.santu.edu.supporter.biz.order.wm.dao.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.santu.edu.supporter.biz.order.wm.pojo.po.WmOrderPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author npc234
 * @description 针对表【edu_supporter_order_wai_mai】的数据库操作Mapper
 * @createDate 2024-02-22 14:15:02
 * @Entity com.santu.edu.supporter.biz.order.wm.pojo.OrderWaiMai
 */
@Mapper
public interface WmOrderMapper {

    /**
     * 插入一条记录
     *
     * @param item
     */
    void insertOne(@Param("item") WmOrderPO item);

    /**
     * 更新一条记录
     *
     * @param item
     */
    void updateOne(@Param("item") WmOrderPO item);


    /**
     * 取消订单
     *
     * @param orderId
     */
    void cancelOrder(@Param("orderId") String orderId);

    /**
     * 查询订单
     *
     * @param schoolId
     * @param userId
     * @param orderType
     * @param objectPage
     * @return
     */
    Page<WmOrderPO> selectOrderPage(@Param("schoolId") String schoolId, @Param("userId") String userId, @Param("orderType") Integer orderType, Page<WmOrderPO> objectPage);

    /**
     * 更新订单状态
     *
     * @param orderId
     * @param orderStatus
     * @param nowOrderStatus
     */
    void updateOrderStatus(@Param("orderId") String orderId, @Param("orderStatus") Integer orderStatus, @Param("nowOrderStatus") Integer nowOrderStatus);

}




